package com.yidu.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yidu.dao.ListenReturnGoodsMapper;
import com.yidu.domain.ListenFinance;
import com.yidu.domain.ListenPurchase;
import com.yidu.domain.ListenReturnGoods;
import com.yidu.domain.ListenStock;
import com.yidu.service.ListenReturnGoodsService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiangyu
 * @since 2018-11-27
 */
@Service
public class ListenReturnGoodsServiceImpl implements ListenReturnGoodsService {
	@Resource
	ListenReturnGoodsMapper dao;
	@Override
	public List<ListenPurchase> selectAll(Map<String, Object> map) {
		return dao.selectAll(map);
	}

	@Override
	public int selectAllRows(Map<String, Object> map) {
		return dao.selectAllRows(map);
	}

	@Override
	public int addReturn(ListenReturnGoods goods) {
		return dao.insertSelective(goods);
	}

	@Override
	public List<ListenReturnGoods> selectReturnAll(Map<String, Object> map) {
		return dao.selectReturnAll(map);
	}

	@Override
	public int selectReturnCount(Map<String, Object> map) {
		return dao.selectReturnCount(map);
	}

	@Override
	public int updateState(ListenReturnGoods goods) {
		return dao.updateByPrimaryKeySelective(goods);
	}

	@Override
	public int updateAddNumber(ListenStock listenStock) {
		return dao.updateAddNumber(listenStock);
	}

	@Override
	public int updateMinusNumber(ListenStock listenStock) {
		return dao.updateMinusNumber(listenStock);
	}

	@Override
	public int updateAddMoney(ListenFinance finance) {
		return dao.updateAddMoney(finance);
	}

	@Override
	public int updateMinusMoney(ListenFinance finance) {
		return dao.updateMinusMoney(finance);
	}

}
